<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    
  </style>
</head>
<body>
  
</body>
<script>

  // let i=0;
  // document.onmousemove = function(){
  //   i++
  //   console.log(i)
  // }

  let t;
  let i=0;
  document.onmousemove = function(){
    if(t) return;
    t = setTimeout(()=>{
      i++;
      console.log(i);
      t = undefined;
    }, 1000);
  }

</script>
</html>